package com.financial.service.heemoney.convertor;

import com.financial.service.heemoney.dto.HeemoneyConfigDTO;
import com.financial.service.heemoney.dto.businsess.HeemoneyProviderQueryBusinessDTO;
import com.financial.service.heemoney.dto.commmon.HeemoneyProviderQueryCommonDTO;
import com.financial.service.heemoney.dto.inparameter.HeemoneyProviderQueryInParamDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * @Author: wenguoqiang
 * @Email wguoqiango@163.com
 * @Date: 2019/12/6 0006 下午 2:27
 * @Des
 */
@Mapper
public interface HeemoneyProviderQueryConvert {

    HeemoneyProviderQueryConvert MAPPER = Mappers.getMapper(HeemoneyProviderQueryConvert.class);

    @Mapping(target = "method", source = "heemoneyConfigDTO.heemoneyProviderQuery.method")
    @Mapping(target = "isv_mch_uid", source = "heemoneyConfigDTO.heemoneyAccountType.isv_mch_uid")
    @Mapping(target = "isv_app_id",source ="heemoneyConfigDTO.heemoneyAccountType.app_id")
    @Mapping(target = "key",source ="heemoneyConfigDTO.heemoneyAccountType.key")
    HeemoneyProviderQueryCommonDTO configConvertCommonDTO(HeemoneyConfigDTO heemoneyConfigDTO, HeemoneyProviderQueryInParamDTO  heemoneyProviderQueryInParamDTO);

    HeemoneyProviderQueryBusinessDTO configConvertBusinessDTO(HeemoneyConfigDTO heemoneyConfigDTO, HeemoneyProviderQueryInParamDTO  heemoneyProviderQueryInParamDTO);
}
